package top.readhub.wopei.common.exception;

/**
 * Created by daervin on 2021/6/9
 */
public class WoPeiException extends RuntimeException {
    private ExceptionCode code;

    public WoPeiException(ExceptionCode code) {
        super(code.msg);
        this.code = code;
    }

    public WoPeiException(String message, ExceptionCode code) {
        super(message);
        this.code = code;
    }

    public WoPeiException(Throwable cause, ExceptionCode code) {
        super(cause);
        this.code = code;
    }

    public ExceptionCode getCode() {
        return code;
    }
}
